#pragma once
#include "httprequesthandler.h"

using namespace stefanfrings;
class HelloRequestHandler;
class ListRequestHandler;
class RequestHandler;
class LoginRequestHandler;
class LoginPlusRequestHandler;
class StateTestRequestHandler;
class JsonTestRequestHandler;
class requestMapper : public HttpRequestHandler
{
	Q_OBJECT
public:
	static requestMapper* GetInstance();
	~requestMapper();
public:
	void service(HttpRequest& request, HttpResponse& response) override;
	void registerController(QString, HttpRequestHandler*);
private:
	explicit requestMapper(QObject* parent = 0);
private:
	std::map<QString, HttpRequestHandler*> _controllerMap;

};

